package com.itheima.mapper;

import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MyUserMapper {

    void add(User user);

    void deleteById(@Param("id") Integer id);

    List<User> findByCondition(@Param("queryString") String queryString);

    User findById(@Param("id") Integer id);

    void edit(User user);

    User findUserByName(@Param("username") String username);

    List<Integer> findRoleIdsByUserId(@Param("id") Integer id);

    void setRoleAndUser(@Param("roleId") Integer roleId, @Param("id") Integer id);

    void deleteAssociation(@Param("id") Integer id);

    User selectPasswordByname(@Param("username") String username);

    void updatePassword(User user);
}
